#include <bits/stdc++.h>
using namespace std;

int n;
vector <int> data, temp;
int main() {
	ios::sync_with_stdio(false);
	
	n = 10;
	freopen("0.in", "w", stdout);
	cout << n << endl;
	for(int i = 1; i <= n; ++i) cout << rand() << ' ';
	cout << endl;
	
	n = 1e5;
	freopen("1.in", "w", stdout);
	cout << n << endl;
	for(int i = 1; i <= n; ++i) cout << rand() << ' ';
	cout << endl;
	fclose(stdout);
	
	n = 1e6;
	freopen("2.in", "w", stdout);
	cout << n << endl;
	for(int i = 1; i <= n; ++i) cout << rand() << ' ';
	cout << endl;
	fclose(stdout);
	
	n = 1e7;
	freopen("3.in", "w", stdout);
	cout << n << endl;
	for(int i = 1; i <= n; ++i) cout << rand() << ' ';
	cout << endl;
	fclose(stdout);
	
	n = 1e5;
	freopen("4.in", "w", stdout);
	cout << n << endl;
	for(int i = 1; i <= n; ++i) cout << i << ' ';
	cout << endl;
	fclose(stdout);
	
	n = 1e5;
	freopen("5.in", "w", stdout);
	cout << n << endl;
	for(int i = n; i >= 1; --i) cout << i << ' ';
	cout << endl;
	fclose(stdout);
}
